home *** CD-ROM | disk | FTP | other *** search
- #! /bin/sh
- #############################################################################
- #
- # This shell script installs the PC-NFS daemon for you
- # rcb/SGI 09 JUN 94
- #
- #############################################################################
- #
- #############################################################################
- #
- # Copy the Daemon to network directory
- #
- #############################################################################
- if [ -s /usr/etc/pcnfsd ]
- then
- /sbin/echo ""
- /sbin/echo "/usr/etc/pcnfsd already exists, it will be terminated."
- /sbin/echo ""
- /sbin/killall pcnfsd
- fi
- /bin/cp pcnfsd /usr/etc/pcnfsd
- /sbin/echo "pcnfsd file copied."
- #############################################################################
- #
- # Create PC-NFS config file, if needed
- #
- #############################################################################
- if [ -s /etc/pcnfsd.conf ]
- then
- /sbin/echo ""
- /sbin/echo "There is already a PC-NFS configuration file."
- /sbin/echo ""
- else
- umask 0
- /bin/cp pcnfsd.conf /etc
- /sbin/echo "pcnfsd configuration file copied"
- fi
- #############################################################################
- #
- # Create PC-NFS print spool directory, if needed
- #
- #############################################################################
- if [ -d /var/spool/pcnfs ]
- then
- /sbin/echo ""
- /sbin/echo "There is already a PC-NFS print spool directory."
- /sbin/echo ""
- else
- umask 0
- /bin/mkdir /var/spool/pcnfs
- /bin/chmod +rwx /var/spool/pcnfs
- /sbin/echo "pcnfsd spool directory created"
- fi
- /sbin/echo ""
- /sbin/echo "Make sure you export the PC-NFS print spool directory"
- /sbin/echo " /var/spool/pcnfs"
- /sbin/echo "with no access restrictions to allow print spooling."
- /sbin/echo "see: man exportfs"
- /sbin/echo ""
- #############################################################################
- #
- # Install the man-page
- #
- #############################################################################
- if [ -d /usr/catman/local/man8 ]
- then
- /sbin/echo ""
- /sbin/echo "There is already a section 8 man-page directory."
- /sbin/echo ""
- else
- umask 0
- /bin/mkdir /usr/catman/local/man8
- /sbin/echo "Section 8 man-page directory created"
- fi
- /bin/cp pcnfsd.8c /usr/catman/local/man8
- /sbin/echo "PC-NFS daemon manual page(s) installed."
- /sbin/echo ""
- #############################################################################
- #
- # Create /etc/config/pcnfsd
- #
- #############################################################################
- if /etc/chkconfig pcnfsd ; then
- /sbin/echo "PC-NFS daemon is already configured in chkconfig"
- else
- /etc/chkconfig -f pcnfsd on
- fi
- /usr/etc/pcnfsd &
- /sbin/echo "pcnfsd service started"
- #############################################################################
- #
- # All done.
- #
- #############################################################################
- /sbin/echo "PC-NFS daemon installation successful."
-